home *** CD-ROM | disk | FTP | other *** search
- /* NCommPoll.thor by Troels Walsted Hansen
- ** $VER: NCommPoll.thor v2.00 (01.11.94)
- **
- ** An ARexx script that automates NComm dialing of BBSs chosen
- ** from a multiselectable list.
- **
- ** IMPORTANT: To use this script, the BBSs configured in THOR must
- ** have the same name as those in your NComm phonebook.
- **
- ** New: This version is only for THOR v2.0 or higher.
- */
-
- options results
-
- /* needs THOR and bbsread.library functions */
-
- p = ' ' || address() || ' ' || show('P',,)
- thorport = pos(' THOR.',p)
-
- if thorport > 0 then thorport = word(substr(p,thorport+1),1)
- else
- do
- say 'No THOR port found!'
- exit 10
- end
-
- if ~show('p', 'BBSREAD') then
- do
- address command
- "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
- "WaitForPort BBSREAD"
- end
-
- /* request BBSs */
-
- address(bbsread)
- GETBBSLIST stem BBSLIST
- if(rc ~= 0) then
- do
- address(thorport)
- REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
- exit 5
- end
-
- address(thorport)
- THORTOFRONT
- REQUESTLIST instem BBSLIST outstem USERBBSLIST title '"Select BBSs:"' DRAGSELECT MULTISELECT SIZEGADGET
- if(rc ~= 0 | USERBBSLIST.COUNT == 0) then exit
-
- dialstring = ""
-
- do i=1 to USERBBSLIST.COUNT
- dialstring = dialstring || "|" || USERBBSLIST.i
- end
-
- /* Is NComm already running? If not, start it... */
-
- if ~show('p', 'ncomm') then do
- if ~exists("t:NCommStartupScript") then do
- call open(nscript, "t:NCommStartupScript", W)
- call writeln(nscript, "stack 10000")
- call writeln(nscript, "cd NComm:")
- call writeln(nscript, "run <>nil: NComm")
- call close(nscript)
- end
-
- address command
- "execute >nil: t:NCommStartupScript"
- "WaitForPort ncomm"
- if(rc) then exit
- end
-
- address 'ncomm'
- NCOMMTOFRONT
- DIAL strip(dialstring, B, "|")
- exit
-